#pragma once


#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<assert.h>

#define MAX 1000
#define MAX_NAME 20
#define MAX_SEX 5
#define MAX_TEL 12 
#define MAX_ADD 30

struct PeoInfo
{
	char name[MAX_NAME];
	char sex[MAX_SEX];
	int age;
	char tel[MAX_TEL];
	char add[MAX_ADD];
};
struct contact
{
	struct PeoInfo *data;
	int sz;
	int capacity;
};

void menuprint(void);
void PeoInfoadd(struct contact*pc);
void InitContact(struct contact* pc);
void PeoInfodel(struct contact* pc);
void showPeoInfodel(struct contact* pc);
void search(struct contact* pc);
void peochange(struct contact* pc);
void sortContact(struct contact* pc);
void detorycontact(struct contact* pc);
void contactsave(struct contact* pc);
void check_capacity(struct contact* pc);